<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>

        // instanceof  判断左边的对象是否在右边的原型链上

        //    只能用来判断引用数据类型

        const arr = [] ;

        console.log(arr instanceof Array);

        console.log(arr instanceof Object);

        let a = new Number(1) ;
        console.log(a instanceof Object);  // true

        let b = 'hi' ;
        console.log(b instanceof String);  // false

        let c = new String('hi');
        console.log(c instanceof String);  // true

    </script>
    
</body>
</html>